package mc.support.taobao.api;

import com.taobao.api.TaobaoRequest;
import com.taobao.api.request.ItemSkuUpdateRequest;
import com.taobao.api.response.ItemSkuUpdateResponse;

/**
 * Created with IntelliJ IDEA. <br/>
 * Author: wangming    <br/>
 * Date: 2014-11-25  <br/>
 */
public class UpdateItemSkuReq extends AbstractReq<UpdateItemSkuReq, ItemSkuUpdateResponse> {

    private Long numIid;
    private String properties;
    private Long quantity;
    private String price;
    private String itemPrice;

    public UpdateItemSkuReq numId( Long numIid ) {
        this.numIid = numIid;
        return this;
    }

    public UpdateItemSkuReq properties( String properties ) {
        this.properties = properties;
        return this;
    }

    public UpdateItemSkuReq quantity( Long quantity ) {
        this.quantity = quantity;
        return this;
    }

    public UpdateItemSkuReq price( String price ) {
        this.price = price;
        return this;
    }

    public UpdateItemSkuReq itemPrice( String itemPrice ) {
        this.itemPrice = itemPrice;
        return this;
    }

    @Override
    protected TaobaoRequest toRequest() {
        ItemSkuUpdateRequest req = new ItemSkuUpdateRequest();

        if ( null != numIid ) {
            req.setNumIid( numIid );
        }

        if ( null != properties ) {
            req.setProperties( properties );
        }

        if ( null != quantity ) {
            req.setQuantity( quantity );
        }

        if ( null != price ) {
            req.setPrice( price );
        }

        if ( null != itemPrice ) {
            req.setItemPrice( itemPrice );
        }

        return req;
    }
}
